{MySQL} Update advanced threat protection payload structure to use pr… - #34016
Open
ShawnX (ShawnXxy) wants to merge 1 commit into
Open
{MySQL} Update advanced threat protection payload structure to use pr…#34016ShawnX (ShawnXxy) wants to merge 1 commit into
ShawnX (ShawnXxy) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested a review
from Yong Zhang (yonzhan)
September 1, 2026 14:22
Contributor
|
Thank you for your contribution ShawnX (@ShawnXxy)! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes az mysql flexible-server advanced-threat-protection-setting update --state by updating the request payload to match the newer ARM/SDK shape (nesting state under properties), addressing the regression reported in #33836.
Changes:
- Update ATP “update” custom command to send
{"properties": {"state": ...}}instead of a flat dict. - Add a unit test validating the payload shape passed to the SDK client for ATP update.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/mysql/custom.py | Adjusts ATP update parameters to use the required properties.state structure for the PATCH body. |
| src/azure-cli/azure/cli/command_modules/mysql/tests/latest/test_mysql_custom.py | Adds a focused unit test to ensure the custom update function passes the nested properties payload. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Collaborator
|
MySQL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 PR Validation — ️✔️ All clear
…operties object
Related command
az mysql flexible-server advanced-threat-protection-setting update --stateDescription
Addressing #33836.
The issue was introduced in #33774 when payload structure changed but ATP command still passes a flat dictionary
The new b2 SDK schema-serialized that dictionary into the required ARM shape:
Testing Guide
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.